import Vue from 'vue'
import App from './App.vue'

import router from './router/index'

import TypeNav from "./components/TypeNav"

import Pagination from "@/components/Pagination"

import store from "./store/index"

import Carsousel from '@/components/Carousel';

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

import 'swiper/css/swiper.css'

import '@/mock/mockServe'

import * as API from "@/api"

import VueLazyload from'vue-lazyload'


Vue.component(TypeNav.name,TypeNav)
Vue.component(Carsousel.name,Carsousel)
Vue.component(Pagination.name,Pagination)

Vue.config.productionTip = false

Vue.use(ElementUI);

import lbxx from "@/assets/1.jpg"
Vue.use(VueLazyload,{
  loading:lbxx
})

// 表单验证插件
import "@/plugins/validate"

new Vue({
  render: h => h(App),
  beforeCreate() {
    Vue.prototype.$bus = this;
    Vue.prototype.$API = API;
  },
  router,
  store
}).$mount('#app')
